public abstract class SouthamptonAgent extends Agent
| Modifier and Type | Field and Description |
|---|---|
protected double |
acceptMultiplier |
protected BidSpace |
bidSpace
Our BidSpace.
|
protected static double |
MAXIMUM_ASPIRATION
Our maximum aspiration level.
|
protected Action |
myLastAction
My previous action.
|
protected Bid |
myLastBid
My previous bid.
|
protected java.util.ArrayList<Bid> |
myPreviousBids
A list of our previous bids.
|
protected java.util.ArrayList<Bid> |
opponentBids
The bids made by the opponent.
|
protected boolean |
opponentIsHardHead |
protected OpponentModel |
opponentModel
Our model of the opponent.
|
protected Bid |
opponentPreviousBid
The opponent's previous bid.
|
fNegotiation, parametervalues, sessionNr, sessionsTotal, startTime, strategyParameters, timeline, totalTime, utilitySpace| Constructor and Description |
|---|
SouthamptonAgent() |
| Modifier and Type | Method and Description |
|---|---|
Action |
chooseAction()
this function is called after ReceiveMessage,
with an Offer-action.
|
protected void |
finalize() |
int |
getAgentNo()
Get the number of the agent.
|
protected Bid |
getRandomBidInRange(double lowerBound,
double upperBound)
Get a random bid in a given utility range.
|
static java.lang.String |
getVersion()
Gets the version number.
|
void |
init()
This method is called by the protocol every time before starting a new
session after the internalInit method is called.
|
void |
log(java.lang.String message)
Output a message, but only if debugging is turned on.
|
protected abstract Bid |
proposeInitialBid()
Propose the initial bid.
|
protected abstract Bid |
proposeNextBid(Bid opponentBid)
Propose the next bid.
|
void |
ReceiveMessage(Action opponentAction)
informs you which action the opponent did
|
endSession, getAgentID, getName, getParameterValues, getSessionNumber, getSessionsTotal, getStrategyParameters, getUtility, internalInit, isUIAgent, loadSessionData, parseStrategyParameters, restartDataObjectsFolder, saveSessionData, setAgentID, setName, sleepprotected static double MAXIMUM_ASPIRATION
protected BidSpace bidSpace
protected Action myLastAction
protected Bid myLastBid
protected java.util.ArrayList<Bid> myPreviousBids
protected java.util.ArrayList<Bid> opponentBids
protected OpponentModel opponentModel
protected Bid opponentPreviousBid
protected final double acceptMultiplier
protected boolean opponentIsHardHead
public static java.lang.String getVersion()
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic final Action chooseAction()
AgentchooseAction in class Agentpublic int getAgentNo()
protected Bid getRandomBidInRange(double lowerBound, double upperBound) throws java.lang.Exception
lowerBound - The lower bound on utility.upperBound - The upper bound on utility.java.lang.Exceptionpublic void init()
Agentpublic final void log(java.lang.String message)
message - The message to output.protected abstract Bid proposeInitialBid() throws java.lang.Exception
java.lang.Exceptionprotected abstract Bid proposeNextBid(Bid opponentBid) throws java.lang.Exception
opponentBid - The bid that has just been made by the opponent.java.lang.Exceptionpublic final void ReceiveMessage(Action opponentAction)
AgentReceiveMessage in class Agent